<?php
class crontab extends ujn_controller {
	var $auto_render = false;
	function resend_old_bottle() {
		echo date('Y-m-d');
		$mi = mdl_bottle_item::getInstance();
		$x = $mi->find_unpick_bottle();
		if($x < 10) {
			echo '<br />start resend';
			$mdatas = $mi->find_unsess_bottle();
			if(!empty($mdatas)) {
				echo '<br />resend bottles' . count($mdatas);
				$iids = array();
				foreach($mdatas as $d) {
					$iids[] = $d['iid'];
				}
				$mi->setReceiveOwner($iids);
			} else
				echo '<br />unfound can resend bottles';
		}
	}
}